package cn.crm.service.impl;

import cn.crm.dao.BasDictDao;
import cn.crm.dao.CstLinkmanDao;
import cn.crm.pojo.BasDict;
import cn.crm.pojo.CstLinkman;
import cn.crm.service.BasDictService;
import cn.crm.service.CstLinkmanService;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Transactional(rollbackFor = Exception.class)//事务回滚
@Service
public class CstLinkmanServiceImpl extends ServiceImpl<CstLinkmanDao, CstLinkman> implements CstLinkmanService {
    @Autowired
    private CstLinkmanDao cstLinkmanDao;
    @Override
    public List<CstLinkman> getListByCustNo(String custNo) {
        LambdaQueryWrapper<CstLinkman> lqw = new LambdaQueryWrapper<>();
        lqw.eq(CstLinkman::getLkmCustNo,custNo);
        return cstLinkmanDao.selectList(lqw);
    }
}
